import { PageContainer } from "@ant-design/pro-components";
import React from "react";
import { history } from "umi";
import { ArrowLeftOutlined } from "@ant-design/icons";
const PageLoading: React.FC = ({
  children,
  header = {},
  isBreadcrumb = false,
  ...props
}) => {
  return (
    <PageContainer
      {...props}
      header={{
        ...header,
        breadcrumb: isBreadcrumb
          ? {
              items: [
                {
                  title: (
                    <ArrowLeftOutlined
                      onClick={() => {
                        history.back(-1);
                      }}
                    />
                  ),
                },
              ],
            }
          : false,
      }}
    >
      {children}
      {/* <PageTable /> */}
    </PageContainer>
  );
};

export default PageLoading;
